package methodFactory;

public class Client {
    public static void main(String[] args) {
        Car car1 = new TeslaFactory().getCar();
        System.out.println(car1.name);

        Car car2 = new WulingFactory().getCar();
        System.out.println(car2.name);

        Car car3 = new DazhongFactory().getCar();
        System.out.println(car3.name);
    }
}
